package com.service.impl;

import java.io.Serializable;

import com.dao.AuthCodeDao;
import com.enetiy.Authcode;
import com.enetiy.Authcodeinfo;
import com.service.AuthCodeService;

public class AuthCodeServiceImpl implements AuthCodeService {
private AuthCodeDao authCodeDao;
	public Serializable insertAuthCode(Authcode auth) throws Exception {
		Serializable sver = authCodeDao.insertAuthCode(auth);
		return sver;
	}

	public void deleteAuthCode(Authcode auth) throws Exception {
		authCodeDao.deleteAuthCode(auth);

	}
	 
	public boolean selectAuthCode(String phone,String code) throws Exception {
		return authCodeDao.selectAuthCode(phone,code);
	}
	
	public void setAuthCodeDao(AuthCodeDao authCodeDao) {
		this.authCodeDao = authCodeDao;
	}

	 
	public Authcode selectAuthCode(String phone) throws Exception {
		return authCodeDao.selectAuthCode(phone);
	}

	@Override
	public void insertAuthCodeInfo(Authcodeinfo authcodeinfo) throws Exception {
		authCodeDao.insertAuthCodeInfo(authcodeinfo);
	}
}
